package config

import "time"

type influxdb struct {
	Token  string `yaml:"token"`
	Url    string `yaml:"url"`
	Org    string `yaml:"org"`
	Bucket string `yaml:"bucket"`
}

type Redis struct {
	Addr         string        `yaml:"addr"`
	DailTimeout  time.Duration `yaml:"dail_timeout"`
	ReadTimeout  time.Duration `yaml:"read_timeout"`
	WriteTimeout time.Duration `yaml:"write_timeout"`
}

type RocketMQ struct {
	Topic       string
	NameSrvAddr []string
	BrokerAddr  string
}

type OpenApi struct {
	IP          string `yaml:"ip"`
	Port        string `yaml:"port"`
	OpenApiPort string `yaml:"OpenApiPort"`
}

// thrift 服务
type ConfigThrift struct {
	DeviceCentre `yaml:"deviceCentre"`
	LogCentre    `yaml:"logCentre"`
	MediaCentre  `yaml:"mediaCentre"`
	ConnCentre   `yaml:"connCentre"`
}

// 设备中心
type DeviceCentre struct {
	IP   string `yaml:"ip"`
	Port string `yaml:"port"`
}

// 日志
type LogCentre struct {
	IP   string `yaml:"ip"`
	Port string `yaml:"port"`
}

// 媒体中心
type MediaCentre struct {
	IP   string `yaml:"ip"`
	Port string `yaml:"port"`
}

// 接入中心
type ConnCentre struct {
	IP   string `yaml:"ip"`
	Port string `yaml:"port"`
}

type MsManager struct {
	MaxCpuUsedPercent float64 `yaml:"MaxCpuUsedPercent"`
	MaxMemUsedPercent float64 `yaml:"MaxMemUsedPercent"`
}
